﻿define([
    'Xjs/core/util',
    'Xjs/ui/Control'
],
function (util, Control) {
    'use strict';

    var type = 'tableFooter',
    TableFooter = Xjs.getType(type);

    if (TableFooter) { // It has been already loaded
        return TableFooter;
    }

    TableFooter = util.define({
        base: Control,
        construct: function (conf, parent) {
            TableFooter.base.constructor.call(this, conf, parent); // Call the base constructor
        },
        tag: 'tfoot',
        type: type,

        getTable: function () {
            return this.parent;
        }
    });

    Xjs.registerType(TableFooter);

    return TableFooter;
});